package com.pai4j.common.exception;

import com.pai4j.common.enums.PAIErrorCommonEnum;

public class UnValidResourceException extends RuntimeException {

    private Integer code = 55555;

    public UnValidResourceException() {
        super();
    }

    public UnValidResourceException(String msg) {
        super(msg);
    }

    public UnValidResourceException(PAIErrorCommonEnum apiErrorCommonEnum) {
        super(apiErrorCommonEnum.getMessage());
        this.code = apiErrorCommonEnum.getCode();
    }

    public UnValidResourceException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }

    public UnValidResourceException(String message, Throwable cause) {
        super(message, cause);
    }

    public Integer getCode() {
        return code;
    }
}
